3.103 \(\int \frac{(a+b \log (c x^n))^2}{(d+e x)^2} \, dx\)

Optimal. Leaf size=77 \[ -\frac{2 b^2 n^2 \text{PolyLog}\left (2,-\frac{e x}{d}\right )}{d e}-\frac{2 b n \log \left (\frac{e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d e}+\frac{x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)} \]

[Out]

(x*(a + b*Log[c*x^n])^2)/(d*(d + e*x)) - (2*b*n*(a + b*Log[c*x^n])*Log[1 + (e*x)/d])/(d*e) - (2*b^2*n^2*PolyLo
g[2, -((e*x)/d)])/(d*e)

________________________________________________________________________________________

Rubi [A]  time = 0.0581115, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {2318, 2317, 2391} \[ -\frac{2 b^2 n^2 \text{PolyLog}\left (2,-\frac{e x}{d}\right )}{d e}-\frac{2 b n \log \left (\frac{e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d e}+\frac{x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/(d + e*x)^2,x]

[Out]

(x*(a + b*Log[c*x^n])^2)/(d*(d + e*x)) - (2*b*n*(a + b*Log[c*x^n])*Log[1 + (e*x)/d])/(d*e) - (2*b^2*n^2*PolyLo
g[2, -((e*x)/d)])/(d*e)

Rule 2318

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_))^2, x_Symbol] :> Simp[(x*(a + b*Log[c*x^n])
^p)/(d*(d + e*x)), x] - Dist[(b*n*p)/d, Int[(a + b*Log[c*x^n])^(p - 1)/(d + e*x), x], x] /; FreeQ[{a, b, c, d,
 e, n, p}, x] && GtQ[p, 0]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^2} \, dx &=\frac{x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)}-\frac{(2 b n) \int \frac{a+b \log \left (c x^n\right )}{d+e x} \, dx}{d}\\ &=\frac{x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)}-\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{e x}{d}\right )}{d e}+\frac{\left (2 b^2 n^2\right ) \int \frac{\log \left (1+\frac{e x}{d}\right )}{x} \, dx}{d e}\\ &=\frac{x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)}-\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{e x}{d}\right )}{d e}-\frac{2 b^2 n^2 \text{Li}_2\left (-\frac{e x}{d}\right )}{d e}\\ \end{align*}

Mathematica [A]  time = 0.0474611, size = 81, normalized size = 1.05 \[ \frac{\left (a+b \log \left (c x^n\right )\right ) \left (a e x+b e x \log \left (c x^n\right )-2 b n (d+e x) \log \left (\frac{e x}{d}+1\right )\right )-2 b^2 n^2 (d+e x) \text{PolyLog}\left (2,-\frac{e x}{d}\right )}{d e (d+e x)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/(d + e*x)^2,x]

[Out]

((a + b*Log[c*x^n])*(a*e*x + b*e*x*Log[c*x^n] - 2*b*n*(d + e*x)*Log[1 + (e*x)/d]) - 2*b^2*n^2*(d + e*x)*PolyLo
g[2, -((e*x)/d)])/(d*e*(d + e*x))

________________________________________________________________________________________

Maple [C]  time = 0.245, size = 755, normalized size = 9.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2/(e*x+d)^2,x)

[Out]

I/(e*x+d)/e*ln(x^n)*b^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+I/e*n/d*ln(x)*b^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)^
2+2*b^2/e*n^2/d*dilog(-e*x/d)-I/e*n/d*ln(e*x+d)*b^2*Pi*csgn(I*c*x^n)^2*csgn(I*c)-2*b/e*n/d*ln(e*x+d)*a+2*b/e*n
/d*ln(x)*a-2/e*n/d*ln(e*x+d)*b^2*ln(c)+2/e*n/d*ln(x)*b^2*ln(c)-b^2/e*n^2/d*ln(x)^2+I/e*n/d*ln(e*x+d)*b^2*Pi*cs
gn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I/e*n/d*ln(x)*b^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I/e*n/d*ln(e*x+d)*b
^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*(I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csg
n(I*c)-I*b*Pi*csgn(I*c*x^n)^3+I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)+2*b*ln(c)+2*a)^2/(e*x+d)/e-I/(e*x+d)/e*ln(x^n)*
b^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2+I/e*n/d*ln(e*x+d)*b^2*Pi*csgn(I*c*x^n)^3-2*b^2/e*n*ln(x^n)/d*ln(e*x+d)+2*b^
2/e*n*ln(x^n)/d*ln(x)+I/(e*x+d)/e*ln(x^n)*b^2*Pi*csgn(I*c*x^n)^3+2*b^2/e*n^2/d*ln(e*x+d)*ln(-e*x/d)-b^2/(e*x+d
)/e*ln(x^n)^2+I/e*n/d*ln(x)*b^2*Pi*csgn(I*c*x^n)^2*csgn(I*c)-I/(e*x+d)/e*ln(x^n)*b^2*Pi*csgn(I*c*x^n)^2*csgn(I
*c)-I/e*n/d*ln(x)*b^2*Pi*csgn(I*c*x^n)^3-2*b/(e*x+d)/e*ln(x^n)*a-2/(e*x+d)/e*ln(x^n)*b^2*ln(c)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -2 \, a b n{\left (\frac{\log \left (e x + d\right )}{d e} - \frac{\log \left (x\right )}{d e}\right )} - b^{2}{\left (\frac{\log \left (x^{n}\right )^{2}}{e^{2} x + d e} - \int \frac{e x \log \left (c\right )^{2} + 2 \,{\left (d n +{\left (e n + e \log \left (c\right )\right )} x\right )} \log \left (x^{n}\right )}{e^{3} x^{3} + 2 \, d e^{2} x^{2} + d^{2} e x}\,{d x}\right )} - \frac{2 \, a b \log \left (c x^{n}\right )}{e^{2} x + d e} - \frac{a^{2}}{e^{2} x + d e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d)^2,x, algorithm="maxima")

[Out]

-2*a*b*n*(log(e*x + d)/(d*e) - log(x)/(d*e)) - b^2*(log(x^n)^2/(e^2*x + d*e) - integrate((e*x*log(c)^2 + 2*(d*
n + (e*n + e*log(c))*x)*log(x^n))/(e^3*x^3 + 2*d*e^2*x^2 + d^2*e*x), x)) - 2*a*b*log(c*x^n)/(e^2*x + d*e) - a^
2/(e^2*x + d*e)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \log \left (c x^{n}\right )^{2} + 2 \, a b \log \left (c x^{n}\right ) + a^{2}}{e^{2} x^{2} + 2 \, d e x + d^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d)^2,x, algorithm="fricas")

[Out]

integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)/(e^2*x^2 + 2*d*e*x + d^2), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c x^{n} \right )}\right )^{2}}{\left (d + e x\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/(e*x+d)**2,x)

[Out]

Integral((a + b*log(c*x**n))**2/(d + e*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x + d\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d)^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2/(e*x + d)^2, x)